var settime = setTimeout(function () {
    // 320X100
    if (window.location.href.indexOf("m.kuaidi100.com/") != -1) {
        var arr = new Array();
        var day=new Date().getDate();
        var month=new Date().getMonth()+1;
        var year=new Date().getFullYear();
        if ($('#content').children().eq(3).height() < 50) {
            if(year==2016&&month==12&&day==14||day==15||day==16){
                arr[0] = ['<a href="https://m.nonobank.com/nono/land-page/?type=gonewsite&am_id=2042&approach=kuaidi " target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612130448.jpg"></a>'];
                arr[1] = ['<a href="https://m.nonobank.com/nono/land-page/?type=gonewsite&am_id=2042&approach=kuaidi " target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612130448.jpg"></a>'];
            }else{
                arr[0] = ['<a href="http://101.200.175.153/K0RjAd" target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612081045.jpg"></a>'];
                arr[1] = ['<a href="http://101.200.175.153/K0RjAd" target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612081045.jpg"></a>'];
            }
            var random_num = Math.round(Math.random());
            $('#content').children().eq(3).append(arr[random_num][0]);
            if (window.location.href.indexOf("m.kuaidi100.com/all/") != -1) {
                $('#content').children().eq(3).css({
                    "margin": "1.25rem auto",
                    "text-align": "center"
                })
            }
        }
        if ($('#success').children().eq(3).height() < 50) {
            if(year==2016&&month==12&&day==14||day==15||day==16){
                arr[0] = ['<a href="https://m.nonobank.com/nono/land-page/?type=gonewsite&am_id=2042&approach=kuaidi " target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612130448.jpg"></a>'];
                arr[1] = ['<a href="https://m.nonobank.com/nono/land-page/?type=gonewsite&am_id=2042&approach=kuaidi " target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612130448.jpg"></a>'];
            }else{
                arr[0] = ['<a href="http://101.200.175.153/K0RjAd" target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612081045.jpg"></a>'];
                arr[1] = ['<a href="http://101.200.175.153/K0RjAd" target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612081045.jpg"></a>'];
            }
            var random_num = Math.round(Math.random());
            $('#success').children().eq(3).append(arr[random_num][0]);
        }
    }
    if(window.location.href.indexOf("www.kuaidi100.com/all/")!=-1){
        if ($('.ex-left').next("div").height() < 300 ) {
            var arr = new Array();
            var date = new Date().getTime();
            arr[0] = ['<div id="' + date + '" style="width: 300px;float: right;"><a href="https://www.cardniu.com/loan/wx/speed-loan.html?channel=kuaidi_4" target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612081042.jpg?version=' + date + '"></a></div>'];
            arr[1] = ['<div id="' + date + '" style="width: 300px;float: right;"><a href="http://www.yuanshanbao.com/m/activity/pingan/ddhb.html?channel=kuaid100ddhb" target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612081141.jpg?version=' + date + '"></a></div>'];
            var random_num = Math.round(Math.random());
            $('.ex-info').append(arr[random_num][0]);
        }
    }
}, 5000)
function getReaddImg() {
    $('#queryContext').children("div").eq(2).remove();
    var settime = setTimeout(function () {
        if (window.location.href.indexOf("www.kuaidi100.com/") != -1) {
            if ($('#queryContext').children("div").eq(1).height() < 310 && $("#queryResult").height() > 120) {
                var arr = new Array();
                var date = new Date().getTime();
                arr[0] = ['<div id="' + date + '" style="float: right;margin-right: 10px;"><a href="https://www.cardniu.com/loan/wx/speed-loan.html?channel=kuaidi_4" target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612081042.jpg?version=' + date + '"></a></div>'];
                arr[1] = ['<div id="' + date + '" style="float: right;margin-right: 10px;"><a href="http://www.yuanshanbao.com/m/activity/pingan/ddhb.html?channel=kuaid100ddhb" target="_blank"><img src="https://cdn.kuaidi100.com/images/kuaidi/201612081141.jpg?version=' + date + '"></a></div>'];
                var random_num = Math.round(Math.random());
                $('#queryContext').append(arr[random_num][0]);
            }
        }
        ;
    }, 1000)
}